<template>
	<view class="page">
		<fu-custom :isBack="true" :isBottom="true" bgColor="bg-white">
			<view slot="content">账号与安全</view>
		</fu-custom>
		<view class="per ">
			<!-- 修改密码 start -->
			 <!-- #ifndef MP-WEIXIN -->
			<view @tap="handleJump" class="per_row_box" data-url="/pages/index/setting/modify-password/index">
				<view class="per_row solid-bottom">
					<text class="text-lg text-black">修改密码</text>
					<text class="fu-iconfont text-bf">&#xe839;</text>
				</view>
			</view>
			<!-- #endif -->
			<!-- 修改密码 end -->
			<!-- 修改支付密码 start -->
			<!-- <view @tap="handleJump" class="per_row_box" data-url="/pages/index/setting/modify-pay-password/index" v-if="!setPass">
				<view class="per_row solid-bottom">
					<text class="text-lg text-black">修改提现密码</text>
					<text class="fu-iconfont text-bf">&#xe839;</text>
				</view>
			</view> -->
			<!-- 修改支付密码 end -->
			<!-- 设置支付密码 start -->
			<!-- <view @tap="handleJump" class="per_row_box" data-url="/pages/index/setting/change-pay-password/index" v-else>
				<view class="per_row solid-bottom">
					<text class="text-lg text-black">设置支付密码</text>
					<text class="fu-iconfont text-bf">&#xe839;</text>
				</view>
			</view> -->
			<!-- 设置支付密码 end -->
			<!-- 更换手机号 start -->
			<view @tap="handleJump" class="per_row_box" data-url="/pages/index/setting/modify-password-verify-phone/index?type=3">
				<view class="per_row ">
					<text class="text-lg text-black">修改绑定手机号</text>
					<text class="fu-iconfont text-bf">&#xe839;</text>
				</view>
			</view>
			<view @tap="handleJump" class="per_row_box" data-url="/pages/user/wallet/card-bind/index">
				<view class="per_row ">
					<text class="text-lg text-black">修改银行卡</text>
					<text class="fu-iconfont text-bf">&#xe839;</text>
				</view>
			</view>
			<!-- 更换手机号 end -->
		</view>
		<view class="flex justify-center align-cente padding margin-top-sm bg-white text-lg text-black" @tap="zhuxiao">注销账号</view>
    <!-- <view class="flex justify-center align-cente padding margin-top-sm bg-white text-lg text-black" @tap="handleJump" data-url="/pages/index/setting/cancelAccount/index">注销账号</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				setPass:false
			};
		},
		computed: {
			// 是否登录状态
			isLogin() {
				return this.$store.getters.isLogin;
			}
		},
		onShow() {

		},
		onLoad() {

		},
		methods: {
			//注销账号
			zhuxiao(){
				this.$api
					.post(global.apiUrls.postGetUserInfo, {
						user_id: (global.userInfo && global.userInfo.id) || 0
					})
					.then(res => {
						console.log(res, res.data.data.status, 'res.data.status');
						if (res.data.code == 1) {
							if(res.data.data.status == 1){
								uni.navigateTo({
									url: '/pages/index/setting/cancelAccount/index'
								})
							}
							if(res.data.data.status == 0){
								uni.navigateTo({
									url: '/pages/index/setting/result/index?isSuccess=2&text='+res.data.data.unsubscribe_describe
								})
							}
						}
					});
			},
		}
	};
</script>

<style lang="scss" scoped>
	.page{
		min-height: 100vh;
		background: #f8f8f8;
	}
	// 列表样式 start
	.per {
		font-size: 28upx;
		// background-color: #fff;
    .per_row_box{
      padding:0px 0 0 32rpx;
      background-color: #fff;
    }
		.per_row {
			padding: 30upx 0;
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: space-between;
			/* border-bottom: 1px solid #ededed; */

			text {
				&:nth-child(1) {
					width: 100%;

					text {
						width: auto;
						margin-right: 10upx;
						color: #999;
						float: right;
						line-height: 36upx;
					}
				}
			}

			.row_right {
				text-align: right;

				.aa {
					color: #999999;
					display: inline-block;
					margin-right: 10upx;
				}
			}
		}
	}
	.fu-iconfont{
		margin-right:32rpx;
		font-size: 24rpx;
	}
	.p-r-32{
		margin-right:32rpx;
	}
	// 列表样式 end


</style>
